package com.iloomo.util;

import org.apache.shiro.session.Session;

/**
 * @author
 * @version 1.0
 * @className SessionCodeCheckUtil
 * @date 2019/4/29 12:16
 * @description TODO
 */
public class SessionCodeCheckUtil {
    public static boolean check(Session session,String code,String codeKey) {
        String sessionCode = (String) session.getAttribute(codeKey);        //获取session中的验证码
        return Tools.notEmpty(sessionCode) && sessionCode.equalsIgnoreCase(code);        //判断登录验证码
    }
}